//
//  DepreModel.m
//  CarHome
//
//  Created by 张世琦 on 14-9-18.
//  Copyright (c) 2014年 WJN_work@163.com. All rights reserved.
//

#import "DepreModel.h"

@implementation DepreModel

- (void)dealloc
{
    [_car release];
    [_seriesid release];
    [_seriesname release];
    [_articleid release];
    [_articletype release];
    [_specid release];
    [_specname release];
    [_specpic release];
    [_inventorystate release];
    [_styledinventorystate release];
    _seriesid = nil;
    _seriesname = nil;
    _articleid = nil;
    _articletype = nil;
    _specid = nil;
    _specname = nil;
    _specpic = nil;
    _inventorystate = nil;
    _car = nil;
    [super dealloc];
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.car = [[DepreCarModel alloc] init];
    }
    return self;
}

+(DepreModel *)depreModelWithimg:(NSString *)carImg name:(NSString *)carName typename:(NSString *)carTypename depre:(CGFloat)carDepre price:(CGFloat)carPrice city:(NSString *)carCity shop:(NSString *)carShop sell:(NSString *)carSell type:(NSString *)carType specid:(NSString *)carSpecid articleid:(NSString *)carArticleid articletype:(NSString *)carArticletype carid:(NSString *)carid seriesid:(NSString *)carSeriesid ispromotion:(NSString *)carIspromotion
{
    DepreModel *model = [[[DepreModel alloc] init] autorelease];
    model.specpic = carImg;
    model.seriesname = carName;
    model.specname = carTypename;
    model.dealerprice = carDepre;
    model.fctprice = carPrice;
    model.car.city = carCity;
    model.car.shortname = carShop;
    model.car.orderrange = carSell;
    model.styledinventorystate = carType;
    model.specid = carSpecid;
    model.articleid = carArticleid;
    model.articletype = carArticletype;
    model.car.carId = carid;
    model.seriesid = carSeriesid;
    model.car.ispromotion = carIspromotion;
    return model;
}

@end
